<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="oci8.configuration.html">运行时配置</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="oci8.examples.html">范例</a></div>
 <div class="up"><a href="book.oci8.html">OCI8</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="oci8.constants" class="appendix">
 <h1>预定义常量</h1>

 <p class="simpara">下列常量由此扩展定义，且仅在此扩展编译入 PHP 或在运行时动态载入时可用。</p>
 <table class="doctable table">
   <caption><strong>OCI8 Function and Method Modes</strong></caption>
   
     <thead>
       <tr>
         <th>Constant</th>
         <th>Description</th>
       </tr>

     </thead>

     <tbody class="tbody">
       <tr id="constant.oci-assoc">
         <td><strong><code>OCI_ASSOC</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-fetch-all.html" class="function">oci_fetch_all()</a></span> and
           <span class="function"><a href="function.oci-fetch-array.html" class="function">oci_fetch_array()</a></span> to get results as an associative
           array.
         </td>
       </tr>

       <tr id="constant.oci-both">
         <td><strong><code>OCI_BOTH</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-fetch-all.html" class="function">oci_fetch_all()</a></span> and
           <span class="function"><a href="function.oci-fetch-array.html" class="function">oci_fetch_array()</a></span> to get results as an
           array with both associative and number indices.
         </td>
       </tr>

       <tr id="constant.oci-commit-on-success">
         <td><strong><code>OCI_COMMIT_ON_SUCCESS</code></strong></td>
         <td>
           Statement execution mode for <span class="function"><a href="function.oci-execute.html" class="function">oci_execute()</a></span>
           call. Automatically commit changes when the statement has
           succeeded.
         </td>
       </tr>

       <tr id="constant.oci-cred-ext">
         <td><strong><code>OCI_CRED_EXT</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-connect.html" class="function">oci_connect()</a></span> for using
           Oracles&#039; External or OS authentication.  Introduced in PHP
           5.3 and PECL OCI8 1.3.4.
         </td>
       </tr>

       <tr id="constant.oci-default">
         <td><strong><code>OCI_DEFAULT</code></strong></td>
         <td>
           See <strong><code>OCI_NO_AUTO_COMMIT</code></strong>.
         </td>
       </tr>

       <tr id="constant.oci-describe-only">
         <td><strong><code>OCI_DESCRIBE_ONLY</code></strong></td>
         <td>
           Statement execution mode
           for <span class="function"><a href="function.oci-execute.html" class="function">oci_execute()</a></span>.  Use this mode if you
           want meta data such as the column names but don&#039;t want to
           fetch rows from the query.
         </td>
       </tr>

       <tr id="constant.oci-exact-fetch">
         <td><strong><code>OCI_EXACT_FETCH</code></strong></td>
         <td>
           Obsolete. Statement fetch mode. Used when the application
           knows in advance exactly how many rows it will be fetching.
           This mode turns prefetching off for Oracle release 8 or
           later mode. The cursor is canceled after the desired rows
           are fetched which may result in reduced server-side
           resource usage.
         </td>
       </tr>

       <tr id="constant.oci-fetchstatement-by-column">
         <td><strong><code>OCI_FETCHSTATEMENT_BY_COLUMN</code></strong></td>
         <td>
           Default mode of <span class="function"><a href="function.oci-fetch-all.html" class="function">oci_fetch_all()</a></span>.
         </td>
       </tr>

       <tr id="constant.oci-fetchstatement-by-row">
         <td><strong><code>OCI_FETCHSTATEMENT_BY_ROW</code></strong></td>
         <td>
           Alternative mode of <span class="function"><a href="function.oci-fetch-all.html" class="function">oci_fetch_all()</a></span>.
         </td>
       </tr>

       <tr id="constant.oci-lob-buffer-free">
         <td><strong><code>OCI_LOB_BUFFER_FREE</code></strong></td>
         <td>
           Used with <a href="oci-lob.flush.html" class="xref">OCI-Lob::flush</a> to free
           buffers used.
         </td>
       </tr>

       <tr id="constant.oci-no-auto-commit">
         <td><strong><code>OCI_NO_AUTO_COMMIT</code></strong></td>
         <td>
           Statement execution mode
           for <span class="function"><a href="function.oci-execute.html" class="function">oci_execute()</a></span>. The transaction is not
           automatically committed when using this mode.  For
           readability in new code, use this value instead of the
           older, equivalent <strong><code>OCI_DEFAULT</code></strong> constant.
           Introduced in PHP 5.3.2 (PECL OCI8 1.4).
         </td>
       </tr>

       <tr id="constant.oci-num">
         <td><strong><code>OCI_NUM</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-fetch-all.html" class="function">oci_fetch_all()</a></span> and
           <span class="function"><a href="function.oci-fetch-array.html" class="function">oci_fetch_array()</a></span> to get results as an
           enumerated array.
         </td>
       </tr>

       <tr id="constant.oci-return-lobs">
         <td><strong><code>OCI_RETURN_LOBS</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-fetch-array.html" class="function">oci_fetch_array()</a></span> to get the
           data value of the LOB instead of the descriptor.
         </td>
       </tr>

       <tr id="constant.oci-return-nulls">
         <td><strong><code>OCI_RETURN_NULLS</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-fetch-array.html" class="function">oci_fetch_array()</a></span> to get empty
           array elements if the row items value is <strong><code>NULL</code></strong>.
         </td>
       </tr>

       <tr id="constant.oci-seek-cur">
         <td><strong><code>OCI_SEEK_CUR</code></strong></td>
         <td>
           Used with <a href="oci-lob.seek.html" class="xref">OCI-Lob::seek</a> to set the seek position.
         </td>
       </tr>

       <tr id="constant.oci-seek-end">
         <td><strong><code>OCI_SEEK_END</code></strong></td>
         <td>
           Used with <a href="oci-lob.seek.html" class="xref">OCI-Lob::seek</a> to set the seek position.
         </td>
       </tr>

       <tr id="constant.oci-seek-set">
         <td><strong><code>OCI_SEEK_SET</code></strong></td>
         <td>
           Used with <a href="oci-lob.seek.html" class="xref">OCI-Lob::seek</a> to set the seek position.
         </td>
       </tr>

       <tr id="constant.oci-sysdate">
         <td><strong><code>OCI_SYSDATE</code></strong></td>
         <td>
           Obsolete.
         </td>
       </tr>

       <tr id="constant.oci-sysdba">
         <td><strong><code>OCI_SYSDBA</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-connect.html" class="function">oci_connect()</a></span> to connect with
           the SYSDBA privilege. The <var class="filename">php.ini</var> setting
           <a href="oci8.configuration.html#ini.oci8.privileged-connect" class="link">oci8.privileged_connect</a>
           should be enabled to use this.
         </td>
       </tr>

       <tr id="constant.oci-sysoper">
         <td><strong><code>OCI_SYSOPER</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-connect.html" class="function">oci_connect()</a></span> to connect with
           the SYSOPER privilege. The <var class="filename">php.ini</var> setting
           <a href="oci8.configuration.html#ini.oci8.privileged-connect" class="link">oci8.privileged_connect</a>
           should be enabled to use this.
         </td>
       </tr>

       <tr id="constant.oci-temp-blob">
         <td><strong><code>OCI_TEMP_BLOB</code></strong></td>
         <td>
           Used with <a href="oci-lob.writetemporary.html" class="xref">OCI-Lob::writeTemporary</a>
           to indicate that a temporary BLOB should be created.
         </td>
       </tr>

       <tr id="constant.oci-temp-clob">
         <td><strong><code>OCI_TEMP_CLOB</code></strong></td>
         <td>
           Used with <a href="oci-lob.writetemporary.html" class="xref">OCI-Lob::writeTemporary</a>
           to indicate that a temporary CLOB should be created.
         </td>
       </tr>

     </tbody>
   
 </table>

 <table class="doctable table">
   <caption><strong>OCI8 Bind and Define Types</strong></caption>
   
     <thead>
       <tr>
         <th>Constant</th>
         <th>Description</th>
       </tr>

     </thead>

     <tbody class="tbody">
       <tr id="constant.oci-b-bfile">
         <td><strong><code>OCI_B_BFILE</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> when binding
           BFILEs.
         </td>
       </tr>

       <tr id="constant.oci-b-bin">
         <td><strong><code>OCI_B_BIN</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> to bind RAW values.
         </td>
       </tr>

       <tr id="constant.oci-b-blob">
         <td><strong><code>OCI_B_BLOB</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> when
           binding BLOBs.
         </td>
       </tr>

       <tr id="constant.oci-b-cfilee">
         <td><strong><code>OCI_B_CFILEE</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> when binding
           CFILEs.
         </td>
       </tr>

       <tr id="constant.oci-b-clob">
         <td><strong><code>OCI_B_CLOB</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> when binding
           CLOBs.
         </td>
       </tr>

       <tr id="constant.oci-b-cursor">
         <td><strong><code>OCI_B_CURSOR</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> when binding
           cursors, previously allocated
           with <span class="function"><a href="function.oci-new-descriptor.html" class="function">oci_new_descriptor()</a></span>.
         </td>
       </tr>

       <tr id="constant.oci-b-int">
         <td><strong><code>OCI_B_INT</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           INTEGER.
         </td>
       </tr>

       <tr id="constant.oci-b-nty">
         <td><strong><code>OCI_B_NTY</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> when binding
           named data types. Note: in PHP &lt; 5.0 it was called
           <strong><code>OCI_B_SQLT_NTY</code></strong>.
         </td>
       </tr>

       <tr id="constant.oci-b-num">
         <td><strong><code>OCI_B_NUM</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           NUMBER.
         </td>
       </tr>

       <tr id="constant.oci-b-rowid">
         <td><strong><code>OCI_B_ROWID</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> when binding
           ROWIDs.
         </td>
       </tr>

       <tr id="constant.sqlt-afc">
         <td><strong><code>SQLT_AFC</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           CHAR.
         </td>
       </tr>

       <tr id="constant.sqlt-avc">
         <td><strong><code>SQLT_AVC</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           VARCHAR2.
         </td>
       </tr>

       <tr id="constant.sqlt-bdouble">
         <td><strong><code>SQLT_BDOUBLE</code></strong></td>
         <td>
           Not supported.
         </td>
       </tr>

       <tr id="constant.sqlt-bfilee">
         <td><strong><code>SQLT_BFILEE</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_BFILE</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-bfloat">
         <td><strong><code>SQLT_BFLOAT</code></strong></td>
         <td>
           Not supported.
         </td>
       </tr>

       <tr id="constant.sqlt-bin">
         <td><strong><code>SQLT_BIN</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_BIN</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-blob">
         <td><strong><code>SQLT_BLOB</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_BLOB</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-cfilee">
         <td><strong><code>SQLT_CFILEE</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_CFILEE</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-chr">
         <td><strong><code>SQLT_CHR</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           VARCHAR2.
           Also used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span>.
         </td>
       </tr>

       <tr id="constant.sqlt-clob">
         <td><strong><code>SQLT_CLOB</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_CLOB</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-flt">
         <td><strong><code>SQLT_FLT</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           FLOAT.
         </td>
       </tr>

       <tr id="constant.sqlt-int">
         <td><strong><code>SQLT_INT</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_INT</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-lbi">
         <td><strong><code>SQLT_LBI</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> to bind LONG RAW values.
         </td>
       </tr>

       <tr id="constant.sqlt-lng">
         <td><strong><code>SQLT_LNG</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-by-name.html" class="function">oci_bind_by_name()</a></span> to bind LONG values.
         </td>
       </tr>

       <tr id="constant.sqlt-lvc">
         <td><strong><code>SQLT_LVC</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           LONG VARCHAR.
         </td>
       </tr>

       <tr id="constant.sqlt-nty">
         <td><strong><code>SQLT_NTY</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_NTY</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-num">
         <td><strong><code>SQLT_NUM</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_NUM</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-odt">
         <td><strong><code>SQLT_ODT</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           LONG.
         </td>
       </tr>

       <tr id="constant.sqlt-rdd">
         <td><strong><code>SQLT_RDD</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_ROWID</code></strong>.
         </td>
       </tr>

       <tr id="constant.sqlt-rset">
         <td><strong><code>SQLT_RSET</code></strong></td>
         <td>
           The same as <strong><code>OCI_B_CURSOR</code></strong>.           
         </td>
       </tr>

       <tr id="constant.sqlt-str">
         <td><strong><code>SQLT_STR</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           STRING.
         </td>
       </tr>

       <tr id="constant.sqlt-uin">
         <td><strong><code>SQLT_UIN</code></strong></td>
         <td>
           Not supported.
         </td>
       </tr>

       <tr id="constant.sqlt-vcs">
         <td><strong><code>SQLT_VCS</code></strong></td>
         <td>
           Used with <span class="function"><a href="function.oci-bind-array-by-name.html" class="function">oci_bind_array_by_name()</a></span> to bind arrays of
           VARCHAR.
         </td>
       </tr>

     </tbody>
   
 </table>

 <table class="doctable table">
   <caption><strong>OCI8 Descriptor Types</strong></caption>
   
     <thead>
       <tr>
         <th>Constant</th>
         <th>Description</th>
       </tr>

     </thead>

     <tbody class="tbody">
       <tr id="constant.oci-dtype-file">
         <td><strong><code>OCI_DTYPE_FILE</code></strong></td>
         <td>
           This flag tells <span class="function"><a href="function.oci-new-descriptor.html" class="function">oci_new_descriptor()</a></span> to
           initialize a new FILE descriptor.
         </td>
       </tr>

       <tr id="constant.oci-dtype-lob">
         <td><strong><code>OCI_DTYPE_LOB</code></strong></td>
         <td>
           This flag tells <span class="function"><a href="function.oci-new-descriptor.html" class="function">oci_new_descriptor()</a></span> to
           initialize a new LOB descriptor.
         </td>
       </tr>

       <tr id="constant.oci-dtype-rowid">
         <td><strong><code>OCI_DTYPE_ROWID</code></strong></td>
         <td>
           This flag tells <span class="function"><a href="function.oci-new-descriptor.html" class="function">oci_new_descriptor()</a></span> to
           initialize a new ROWID descriptor.
         </td>
       </tr>

       <tr id="constant.oci-d-file">
         <td><strong><code>OCI_D_FILE</code></strong></td>
         <td>
           The same as <strong><code>OCI_DTYPE_FILE</code></strong>.
         </td>
       </tr>

       <tr id="constant.oci-d-lob">
         <td><strong><code>OCI_D_LOB</code></strong></td>
         <td>
           The same as <strong><code>OCI_DTYPE_LOB</code></strong>.
         </td>
       </tr>

       <tr id="constant.oci-d-rowid">
         <td><strong><code>OCI_D_ROWID</code></strong></td>
         <td>
           The same as <strong><code>OCI_DTYPE_ROWID</code></strong>.
         </td>
       </tr>

     </tbody>
   
 </table>

</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="oci8.configuration.html">运行时配置</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="oci8.examples.html">范例</a></div>
 <div class="up"><a href="book.oci8.html">OCI8</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
